===================================================================================================
Introduction
===================================================================================================
This folder contains datasets (dta and csv format) and stata do-files to replicate figures, tables, and other statistics as presented in the paper as well as instructions from the experiment: Dimitri Landa and Dominik Duell: "Social Identity and Electoral Accountability".

Data sets are in the "data"-folder, figures and tables will be stored in the "figures"-folder, and auxiliary programs (additional do-files) are stored in the "programs"-folder. 

I. Data-sets: 
1. LandaDuell_data.csv: data collected in the game phase of the experiment
2. LandaDuell_data_bias.csv: data collected in the game phase of the identity treatment plus the bias measure as derived in section 6 of the paper
3. LandaDuell_exitsurvey.csv: responses from the post-experiment survey

II. Run-files:  
1. LandaDuell_replicationFiles.do: generates all figures, tables, and statistics referenced in the
paper and the supplemental appendix. 
2. LandaDuell_replicationFiles_mainFiguresTablesOnly.do generates all figures and the table values 
from the main paper.
 
===================================================================================================
LandaDuell_data.csv and LandaDuell_data_bias.csv
===================================================================================================
Variables:
======================================
treatment: 1 Baseline, 2 Identity
identity: 2 (constant to mark the identity treatment)
baseline: 1 (constant to mark the baseline treatment)
session: session number within treatment
sessub: subject id
playerid: 1 representative, 2 voter
representative: 2 (constant to mark representatives)
voter: 1 (constant to mark voters)
grouptype: 1 klee, 2 kandinsky
klee: 2 (constant to mark klees)
kandinsky: 1 (constant to mark kadinskys)
ingroup: 0 Out-group, 1 In-group, 2 Baseline
paintingdecision1: 1 klee, 2 kandinsky
paintingdecision2: 1 klee, 2 kandinsky
paintingdecision3: 1 klee, 2 kandinsky
electiondecision: 0 not retained, 1 retained
choice 1: 5-20 investment into effort pre-election, acronym: c1
choice 2: 5-20 investment into effort post-election, acronym: c2
type: 20-50 level of competence, acronym: tv
noise: -15 - +15 random draw from uniform distribution
extv: type_omega: approx. 5-65
lowtype: 1 = 20-34 level of competence, 0 = 45-50 level of competence
exlowtype: 1 = 5-34 type_omega, 35-65 type_omega
period: 1-20 round of play
firsthalf: 0 Second half, 1 First half of session
tempprofit: round profit

Generated by LandaDuell_replicationFiles.do and included in LandaDuell_data_bias.csv
bias: -1 Out-group bias, 1 In-group bias

===================================================================================================
Landa_Duell_exitsurvey.csv
===================================================================================================
Questions: 
======================================
Q1: What is your age?
Q2: What is your gender?
Q3: What is your major at NYU?
Q4: What do you consider your racial or ethnic background to be?
Q5: On a scale from 1 to 10, please rate how helpful the input from others who were members of the same group as you (that is, "Klees", if you were a "Klees", or "Kandinskys", if you were a "Kandinsky") was in solving the five-painting quiz in Part 2 of the experiment.
Q6: On a scale from 1 to 10, please rate how familiar you were with the paintings made by Klee and Kandinsky  before this experiment.
Q7: On a scale from 1 to 10, please rate how closely attached you felt to your fellow "Klees" if you were a "Klee" yourself or to your fellow "Kandinskys" if you were a "Kandinsky" yourself throughout the experiment.
Q8: In part 2 of the paid session, when you were a representative, how would you describe the strategies you used?
Q9: In Part 2 of the paid session, when you were a voter, how would you describe the strategies you used?
Q10: Please tell us how your decisions as a voter were affected by being matched with a representative who was a fan of the same artist (that is, if you were a "Klee" and the representative was a "Klee", or if you were a "Kandinsky" and the representative was a "Kandinsky") rather than with a representative who was a fan of a different artist. (1) I was generally more likely to re-elect him/her; (2) I was more likely to re-elect such representative only if s/he had what seemed like a high true number, and otherwise it did not matter; (3) I was more likely to re-elect such representative only if s/he had what seemed like a low true number, and otherwise it did not matter; (4) Whether the representative I was matched with was a fan of the same artist did not matter for my choices as a voter; (5) Other. Please specify. 
Q11: Please tell us how your decisions as a representative were affected by being matched with a voter who was a fan of the same artist (that is, if you were a Klee and the voter was a Klee, or if you were a Kandinsky and the voter was a Kandinsky) rather than with a voter who was a fan of a different artist. Please choose all that apply: (1) It made my group choice 1 higher when my true number was relatively low; (2) It made my group choice 1 higher when my true number was relatively high; (3) It made my group choice 1 higher regardless of whether my true number was relatively low or relatively high; (4) It made my group choice 1 lower when my true number was relatively low; (5) It made my group choice 1 lower when my true number was relatively high; (6) It made my group choice 1 higher regardless of whether my true number was relatively low or relatively high; (6) Other. Please specify.
Q12: In Part 2 of the paid session, when you were a representative, what was the rationale behind your group choice 2?

======================================
Variables: 
======================================
treatment: 1 = baseline, 2 = identity
sessub: subject id
q1 - q12: Question 1 to Question 12
idbehaviorasvoter (based on Q10): 
1 = I was generally more likely to re-elect him/her; 
2 = I was more likely to re-elect such representative only if s/he had what seemed like a high true number, and otherwise it did not matter;
3 = I was more likely to re-elect such representative only if s/he had what seemed like a low true number, and otherwise it did not matter;
4 = Whether the representative I was matched with was a fan of the same artist did not matter for my choices as a voter
12 = 1 and 2;
24 = 2 and 4;
34 = 3 and 4;
99 = Didn't care;
idbehaviorasrep (based on Q11): 
1 = It made my group choice 1 higher when my true number was relatively low;
2 = It made my group choice 1 higher when my true number was relatively high;
3 = It made my group choice 1 higher regardless of whether my true number was relatively low or relatively high;
4 = It made my group choice 1 lower when my true number was relatively low;
5 = It made my group choice 1 lower when my true number was relatively high;
6 = It made my group choice 1 higher regardless of whether my true number was relatively low or relatively high;
7 = ID didn't matter;
13 = 1 and 3;
15 = 1 and 5;
24 = 2 and 4;
145 = 1, 4, and 5;
99 = Didn't care;	
typeoreffort (based on Q8):
Percentage of subjects mentioning...
1 = sufficiently high choice 1 consequence;
2 = sufficiently high type_omega;
3 = sufficiently high choice 1;
4 = sufficiently high type_omega or choice 1;
5 = a constant retention rule;
6 = in-group status of representative;
thresholdConsequence (based on Q9):

===================================================================================================
Notes
===================================================================================================
1. LandaDuell_replicationFiles.do gives you the bias-measure plot for all subjects not just the 4 presented in the appendix of the paper. 